﻿using LyData.Data.Xml;
using System;
using System.Collections;
using System.Web;

public class SiteInfo
{
    public static void SetSiteLanguage(string siteLanguage)
    {
        HttpContext.Current.Session["siteLanguage"] = siteLanguage;
    }

    public static string SiteLanguage()
    {
        string str = (string) HttpContext.Current.Session["siteLanguage"];
        if (str == null)
        {
            ManagerLogin.Out();
            return "";
        }
        return str;
    }

    public static SortedList SiteLanguageList()
    {
        SortedList list = new SortedList();
        XmlProvider provider = new XmlProvider();
        provider.FilePath = HttpContext.Current.Server.MapPath("~/App_Data/Website.xml");
        return provider.ReadNode("descendant::LanguageList", "Value", "Text");
    }
}

